package com.lagou.config;

/**
 * @author 黄子濠
 * @date 2020/6/25 17:22
 */
public enum SqlTypeEnum {

    SELECT("select"),
    INSERT("insert"),
    UPDATE("update"),
    DELETE("delete");

    private String name;

    SqlTypeEnum(String name) {
        this.name = name;
    }

    public static SqlTypeEnum getByName(String name){
        for (SqlTypeEnum sqlType:SqlTypeEnum.values()) {
            if (sqlType.name.equals(name)){
                return sqlType;
            }
        }
        return null;
    }
}
